<div class="page secondary">
    <div class="page-header">
        <div class="page-header-content">
            <h1>Relación de Secciones y Cartas</h1>
        </div>
    </div>
</div>

<?php



?>


<div id="tabs">
    <ul>
        <?php foreach ($secciones as $seccion): ?>
            <li><a href="#tabs-<?php echo $seccion['Section']['id']; ?>"><?php echo $seccion['Section']['nombre']; ?></a>
            </li> 
                
        <?php endforeach; ?>
    </ul>

   
     <?php foreach ($secciones as $seccion): ?>
   
    <div id="tabs-<?php echo $seccion['Section']['id']; ?>">
        <?php
    $array = $this->requestAction('cartasections/getItems/'.$seccion['Section']['id']);?>
     <ul id="sortable">
            <?php 
            
            foreach ($array as $carta): ?>
              <li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><?php echo $carta['CartaSection']['id_carta'];?></li>
            <?php endforeach;?>
              </ul>
    </div>
   

    <?php endforeach; ?>
      

</div>



<script>
    $(function() {
        var tabTitle = $( "#tab_title" ),
         tabContent = $( "#tab_content" );
        var tabs = $( "#tabs" ).tabs();

    });
    </script>    
